<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="author" content="wangbo">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes myfu {
            0% {
                transform: scale(1);
            }
            50% {
                transform:  scale(0.5);
                opacity: 0.5;
            }
            100% {
                transform:  scale(1);
            }
        }
        @keyframes myjian {
            0% {                
                transform: translateX(-2000px) scale(0.1);
            }
            20% {
                transform: translateX(-800px) scale(0.2);
            }
            50% {
                transform: translateX(-500px) scale(0.3) rotate(360deg) ;
            }
            80% {
                transform: translateX(-500px) scale(0.5) ;
            }
            100% {
                transform: translateX(0px)
            }
        }
        /* 页面内初始化,清除所有标签内外边距 */
        * {
            margin: 0;
            padding: 0;
        }

        div {
            width: 200px;
            height: 200px;
        }

        .fu {
            position: relative;
            left: 0;
            top: 0;
            margin: 200px auto;
            /* animation: myfu 2s infinite; */
        }

        .fu div {
            position: absolute;
            top: 0;
        }

        /* 子绝父相,子类绝对定位 */
        .xin_zuo,
        .xin_you {
            background-color: red;
            transform: rotate(45deg);
        }

        .xin_zuo {
            left: -120px;
        }

        .xin_you {
            right: -120px;
        }

        .zuo {
            left: -90px;
            background-color: red;
            border-radius: 50%;
        }

        div.you {
            top: -90px;
            background-color: red;
            border-radius: 50%;
        }

        div.jian {
            width: 1000px;
            height: 0px;
            left: -400px;
            top: 100px;
            border-bottom: 2px solid #f00;
            z-index: 2;
            animation: myjian 10s forwards;
        }

        div.tou {
            width: 100px;
            height: 100px;
            border: 2px solid #f00;
            border-top-width: 0px;
            border-left-width: 0px;
            right: 0;
            top: -50px;
            transform: rotate(-45deg);
        }

        div.shang {
            width: 100px;
            height: 100px;
            border: 2px solid #f00;
            transform: skewX(30deg);
            top: -100px;
        }

        .xia {
            width: 100px;
            height: 100px;
            border: 2px solid #f00;
            transform: skewX(-30deg);
        }
    </style>
</head>

<body>
    <div class="fu">
        <div class="xin_zuo">
            <div class="zuo"></div>
            <div class="you"></div>
        </div>
        <div class="xin_you">
            <div class="zuo"></div>
            <div class="you"></div>
        </div>
        <div class="jian">
            <div class="tou"></div>
            <div class="shang"></div>
            <div class="xia"></div>
        </div>
    </div>

</body>

</html>